package vista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class DlgEmpleado extends javax.swing.JDialog {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JTextField txtNombre;
	private JButton btAceptar;
	private JButton btSalir;
	private JTextField jTextField3;
	private JLabel jLabel1;
	private JTextField jTextField2;
    private JTextField txtApellido;
	private JLabel lblApellido;
	private JLabel lblCodigo;
	private JTextField txtCodigo;
	private JLabel lblNombre;

	/**
	* Auto-generated main method to display this JDialog
	*/
	/*public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				JFrame frame = new JFrame();
				DlgEmpleado inst = new DlgEmpleado(frame);
				inst.setVisible(true);
			}
		});
	}*/
	
	public DlgEmpleado(JDialog dialog) {
		super(dialog);
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				getContentPane().setLayout(null);
				this.setTitle("Empleado");
				{
					txtNombre = new JTextField();
					getContentPane().add(txtNombre);
					txtNombre.setBounds(114, 57, 231, 28);
				}
				{
					lblNombre = new JLabel();
					getContentPane().add(lblNombre);
					lblNombre.setText("Nombre:");
					lblNombre.setFont(new java.awt.Font("Tahoma",1,11));
					lblNombre.setBounds(39, 61, 63, 14);
				}
				{
					txtCodigo = new JTextField();
					getContentPane().add(txtCodigo);
					txtCodigo.setBounds(114, 20, 154, 28);
				}
				{
					lblCodigo = new JLabel();
					getContentPane().add(lblCodigo);
					lblCodigo.setText("Cedula:");
					lblCodigo.setFont(new java.awt.Font("Tahoma",1,11));
					lblCodigo.setBounds(39, 24, 49, 14);
				}
				{
					lblApellido = new JLabel();
					getContentPane().add(lblApellido);
					lblApellido.setText("Apellido");
					lblApellido.setFont(new java.awt.Font("Tahoma",1,11));
					lblApellido.setBounds(39, 105, 49, 14);
				}
				{
					txtApellido = new JTextField();
					getContentPane().add(txtApellido);
					txtApellido.setBounds(114, 101, 231, 28);
				}
				{
					lblApellido = new JLabel();
					getContentPane().add(lblApellido);
					lblApellido.setText("Apellido:");
					lblApellido.setFont(new java.awt.Font("Tahoma",1,11));
					lblApellido.setBounds(39, 105, 63, 14);
				}
				{
					jTextField2 = new JTextField();
					getContentPane().add(jTextField2);
					jTextField2.setBounds(177, 144, 133, 28);
				}
				{
					jLabel1 = new JLabel();
					getContentPane().add(jLabel1);
					jLabel1.setText("Telefono:");
					jLabel1.setFont(new java.awt.Font("Tahoma",1,11));
					jLabel1.setBounds(39, 144, 67, 14);
				}
				{
					jTextField3 = new JTextField();
					getContentPane().add(jTextField3);
					jTextField3.setBounds(114, 144, 51, 28);
				}
				{
					btSalir = new JButton();
					getContentPane().add(btSalir);
					btSalir.setText("Salir");
					btSalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("iconos/Salir.gif")));
					btSalir.setHorizontalTextPosition(JButton.CENTER);
					btSalir.setVerticalTextPosition(JButton.BOTTOM);
					btSalir.setBounds(294, 202, 79, 40);
				}
				{
					btAceptar = new JButton();
					getContentPane().add(btAceptar);
					btAceptar.setText("Aceptar");
					btAceptar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("iconos/Aceptar.png")));
					btAceptar.setHorizontalTextPosition(JButton.CENTER);
					btAceptar.setVerticalTextPosition(JButton.BOTTOM);
					btAceptar.setBounds(196, 202, 79, 40);
				}
			}
			this.setSize(395, 296);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	DlgEmpleado demp=this;
	public void mostrar(JDialog dialog) {
		
		setLocationRelativeTo(null);
		setVisible(true);
		
		
	
		
		btSalir.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				demp.dispose();
			}
		});
	}

}
